//
// Created by wze-zero on 2024/7/25 025.
//
#include<iostream>
#include <vector>
#include <map>
#include <algorithm>

using namespace std;

int main() {
    map<int, int> mp;
    int n, m, num;
    cin >> n >> m;
    for (int i = 0; i < n; ++i) {
        cin >> num;
        mp[num] = 1;
    }
    for (int i = 0; i < m; ++i) {
        cin >> num;
        cout << (mp[num] ? "yes" : "no") << endl;
    }
    return 0;
}